// TOWN DIALOGUE SCRIPT
//    Town 6: Tangramayne

// This is the dialogue for this town.
// You can use states numbered from 1 to 99.

begintalkscript;

variables;

short choice;

// *** Guards ***
begintalknode 1;
	state = -1;
	personality = -1;
	nextstate = -1;
	condition = 1;
	question = "Guard";
	text1 = "The guard looks in your direction.";
	text2 = "_Please move along now._ the guard says.";
	text3 = "_Enjoy your stay and don't cause problems._ the guard says.";
	text4 = "The guard appears to be giving you a cold hard stare.";
	text5 = "_Welcome to Tangramayne visitor._ the guard says.";
	text6 = "The guard sizes you up, then looks away after the official stare doesn't faze you.";
	text7 = "_Stay out of trouble._ the guard says.";
	text8 = "_Not much to see here, but you're welcome to visit._ the guard says.";
	action = END_TALK;
	code =
		clear_strings();
		add_string(1);
		add_string(get_ran(1, 2, 8));
	break;

// *** Miners ***
begintalknode 2;
	state = -1;
	personality = -1;
	nextstate = -1;
	condition = 1;
	question = "Miner";
	text1 = "The miner looks at you as you approach.";
	text2 = "_I hope the mine opens soon._ says the miner before getting back to doing nothing.";
	text3 = "The miner says _Arghh, I'm bored and want to work._";
	text4 = "The miner looks away, not feeling like talking.";
	text5 = "The hopeful look fades as the miner realizes you're not going to tell him the mine is reopened.";
	text6 = "_Well, howdy.  Have a good time in town._ the miner says before turning away.";
	text7 = "_Grrrr, when will this curse be lifted._ the miner says.";
	text8 = "The miner turns back to doing nothing, ignoring your questions.";
	action = END_TALK;
	code =
		clear_strings();
		add_string(1);
		add_string(get_ran(1, 2, 8));
	break;

// *** Charlie ***
begintalknode 6;
	state = -1;
	personality = 606;
	nextstate = 7;
	condition = 1;
	question = "Charlie";
	text1 = "For some reason, this miner seems cheerful, almost happy.";
	text2 = "_Well howdy folks._ he says.  _I'm Charlie._";
	text3 = "_What can I do for you?_ he asks.";
	text5 = "Charlie is whistling as he walks.";
	text6 = "He waves cheerfully at you as you speak to him.";
	text7 = "_Glad to see you again._ he says.";
	text8 = "_Shouldn't we get going so I can show you the way to the mine?_ he asks.";
	action = INTRO;
	code =
		if ((get_flag(51, 10) == TRUE) && (get_flag(200, 3) == FALSE)) {
			remove_string(7);
		}
		else {
			remove_string(8);
		}
	break;

begintalknode 7;
	state = 7;
	personality = 606;
	nextstate = -1;
	condition = 1;
	question = "What do you do?";
	text1 = "Charlie smiles _I work the Tangramayne mine._";
	text2 = "_Or at least I will once The Wilderness is set free again._";
	text3 = "_But until then, I just wait._ he adds.  _I know I will be mining again soon._";
	text4 = "_When you're ready, lets head out so I can show you how to get into it._ he says.";
	code =
		remove_string(4);
		if ((get_flag(51, 10) == TRUE) && (get_flag(200, 3) == FALSE)) {
			add_string(4);
		}
	break;

begintalknode 8;
	state = 7;
	personality = 606;
	nextstate = -1;
	condition = ((get_flag(6, 1) == TRUE) && (get_flag(51, 10) == FALSE));
	question = "Can you show us the way into the mine?";
	text1 = "Charlie says _Sure, Scabban told me you'd be coming._";
	text2 = "_Let me get my stuff and I'll join your party._ he adds.";
	text3 = "_We need to go southeast out of town till you reach a path leading into a crevasse._ Charlie says joining your party.";
	action = END_TALK;
	code =
		set_flag(51, 10, add_char_to_party(6));
	break;

begintalknode 9;
	state = 7;
	personality = 606;
	nextstate = -1;
	condition = 1;
	question = "See you later.";
	text1 = "Charlie waves and says _See Ya._ before getting back on his merry way.";
	text2 = "_Let's get going so you can see the mine._ he says.";
	action = END_TALK;
	code =
		if ((get_flag(51, 10) == TRUE) && (get_flag(200, 3) == FALSE)) {
			remove_string(1);
		}
		else {
			remove_string(2);
		}
	break;

// *** Lucy ***
begintalknode 11;
	state = -1;
	personality = 607;
	nextstate = 12;
	condition = 1;
	question = "Lucy";
	text1 = "A woman, writing in a ledger, stops as you speak to her.";
	text2 = "_Hi, my name is Lucy._ she says.";
	text3 = "_What can I do for you today?_ she then asks.";
	text5 = "Lucy is sharpening what looks like a hoe.";
	text6 = "She waves and says _Come back, have you?_";
	action = INTRO;

begintalknode 12;
	state = 12;
	personality = 607;
	nextstate = 15;
	condition = 1;
	question = "What do you do?";
	text1 = "Lucy replies _I keep the farmers supplied with the equipment and tools they need._";
	text2 = "_I have a good stock if you want to take a look._ she adds.";

begintalknode 13;
	state = 12;
	personality = 607;
	nextstate = -1;
	condition = 1;
	question = "Can I see what you have for sale?";
	text1 = "You finish browsing through the Farm Depot stock.";
	code =
		begin_shop_mode("Farm Depot", "Lucy sells farm supplies.  The prices are somewhat reasonable.", 14, 2, -1);
	break;

begintalknode 14;
	state = 12;
	personality = 607;
	nextstate = -1;
	condition = 1;
	question = "Bye.";
	text1 = "Lucy says _Bye._ before turning to help another customer.";
	action = END_TALK;

begintalknode 15;
	state = 15;
	personality = 607;
	nextstate = -1;
	condition = 1;
	question = "What about mining supplies?";
	text1 = "Lucy answers _Miners can get their needs fulfilled in Thessalonica._";
	text2 = "_I can't compete with that store and keep the prices reasonable for the farmers around here._ she adds.";
	text3 = "_Besides, with the mine closed, there just isn't a market for that kind of equipment right now._";

// *** Elyssa ***
begintalknode 16;
	state = -1;
	personality = 608;
	nextstate = 17;
	condition = 1;
	question = "Elyssa";
	text1 = "A woman is busy waiting on the tables in the room.";
	text2 = "She points to an empty table and says _Have a seat, I'll be right with you._";
	text3 = "She eventually makes her way to you and says _My name is Elyssa, Welcome to the Feed Bag._";
	text4 = "_Can I get you something?_";
	text5 = "Elyssa says _Sit where ever there's an empty seat._";
	text6 = "After making her way to you, she asks _What'll it be today?_";
	action = INTRO;

begintalknode 17;
	state = 17;
	personality = 608;
	nextstate = -1;
	condition = 1;
	question = "What do you do?";
	text1 = "Elyssa answers _I take orders and serve what's ordered._";
	text2 = "_Just let me know if you want to order something._ she adds.";

begintalknode 18;
	state = 17;
	personality = 608;
	nextstate = -1;
	condition = 1;
	question = "What is this place?";
	text1 = "_The Feed Bag is the most famous restaurant in The Wilderness._ Elyssa says.";
	text2 = "_Our menu is unmatched by any place else._";
	text3 = "_Would you like to see the menu?_ she asks.";

begintalknode 19;
	state = 17;
	personality = 608;
	nextstate = -1;
	condition = 1;
	question = "Let me see the menu.";
	text1 = "You finish ordering food from Elyssa.";
	code =
		begin_shop_mode("Feed Bag", "Elyssa shows a menu with a selection of tasty food.  The prices are pretty reasonable.", 1, 2, -1);
	break;

begintalknode 20;
	state = 17;
	personality = 608;
	nextstate = -1;
	condition = 1;
	question = "Nothing now, thanks.";
	text1 = "Elyssa smiles and says _Come back again when you get hungry._";
	action = END_TALK;

// *** Nivius ***
begintalknode 26;
	state = -1;
	personality = 609;
	nextstate = 27;
	condition = 1;
	question = "Nivius";
	text1 = "A man is busy preparing food.";
	text2 = "He wipes some sweat from his brow and says _I am Nivius._";
	text3 = "_If you need something to eat, talk to Elyssa._ he says pointing at the waitress.";
	text5 = "_What do you want?_ Nivius asks.";
	action = INTRO;

begintalknode 27;
	state = 27;
	personality = 609;
	nextstate = -1;
	condition = 1;
	question = "What do you do?";
	text1 = "Nivius replies _I am the cook for the Feed Bag._";
	text2 = "_All of this delicious food, I prepare._ he adds.";
	text3 = "_You'll need to talk to Elyssa if you want to order though._";

begintalknode 28;
	state = 27;
	personality = 609;
	nextstate = -1;
	condition = 1;
	question = "Heard any rumors?";
	text1 = "Nivius says _Don't really have time to listen to rumors._";
	text2 = "He stops and thinks _Though I did hear at one point, prior to the mines closing, that some of them Zanta followers were in the mine._";
	text3 = "_Perhaps Scabban over at the mine storage might have more information._";
	text4 = "_I'm pretty busy here, so if you have nothing else..._";

begintalknode 29;
	state = 27;
	personality = 609;
	nextstate = -1;
	condition = 1;
	question = "Nothing else, thanks.";
	text1 = "Nivius returns to his task of preparing the best food in The Wilderness.";
	action = END_TALK;

// *** Scabban ***
begintalknode 36;
	state = -1;
	personality = 610;
	nextstate = 37;
	condition = 1;
	question = "Scabban";
	text1 = "A man is sitting at the desk looking bored.";
	text2 = "_Hi all._ he says.  _Names Scabban._";
	text3 = "He points around the drab room _Welcome to my domain._";
	text5 = "Scabban is still looking very bored at the desk.";
	text6 = "_You've returned._ he says.";
	text7 = "_Have you found Charlie yet?_ he asks.";
	action = INTRO;
	code =
		remove_string(7);
		if ((get_flag(6, 1) == TRUE) && (get_flag(51, 10) == FALSE)) {
			add_string(7);
		}
	break;

begintalknode 37;
	state = 37;
	personality = 610;
	nextstate = -1;
	condition = 1;
	question = "What do you do?";
	text1 = "Scabban answers _Besides being bored, I manage the mining storage facility._";
	text2 = "_Of course, since the mine is closed currently, I manage an empty building._";
	text3 = "_So I sit, waiting until The Wilderness is set free and the mine reopens._ he says.";

begintalknode 38;
	state = 37;
	personality = 610;
	nextstate = -1;
	condition = 1;
	question = "Where is the Tangramayne mine?";
	text1 = "_Not sure you want to go in there._ Scabban says.";
	text2 = "_Before we closed it, some of them Zanta followers were seen sneaking around._";
	text3 = "_But if you insist, I'll tell Charlie to show you how to get there._ he says.";
	text4 = "_Charlie should be wandering around town someplace._ Scabban adds.";
	text5 = "_Have you found Charlie yet to show you how to get there?_ Scabban asks.  _He's around town._";
	text6 = "_I see you've found Charlie so you should be able to find the mine now._ Scabban says.";
	code =
		remove_string(3);
		remove_string(4);
		remove_string(5);
		remove_string(6);
		if ((get_flag(6, 1) == TRUE) && (get_flag(51, 10) == FALSE)) {
			add_string(5);
		}
		if (get_flag(6, 1) == FALSE) {
			add_string(3);
			add_string(4);
			set_flag(6, 1, TRUE);
		}
		if ((get_flag(51, 10) == TRUE) && (get_flag(200, 3) == FALSE)) {
			add_string(6);
		}
	break;

begintalknode 39;
	state = 37;
	personality = 610;
	nextstate = -1;
	condition = 1;
	question = "Bye.";
	text1 = "Scabban waves you off, then goes back to being bored.";
	action = END_TALK;

// *** Kira ***
begintalknode 46;
	state = -1;
	personality = 611;
	nextstate = 47;
	condition = 1;
	question = "Kira";
	text1 = "A woman, sitting behind the desk, is writing something in a record book.";
	text2 = "_Hey all._ she says _Name's Kira._";
	text3 = "_Do you have something you need to store for market?_";
	text5 = "Kira is pretty busy at her desk, keeping up with the co-op business.";
	text6 = "_Do you need something else?_ she asks.";
	action = INTRO;

begintalknode 47;
	state = 47;
	personality = 611;
	nextstate = -1;
	condition = 1;
	question = "What do you do?";
	text1 = "Kira says _I manage the farm co-op storage._";
	text2 = "_Farmers from all over bring their crops here to store before moving them on to market._";
	text3 = "_We keep pretty busy, though not as busy as before The Wilderness lost its protection._";

begintalknode 48;
	state = 47;
	personality = 611;
	nextstate = -1;
	condition = 1;
	question = "What is the purpose of this place?";
	text1 = "_The farm co-op storage is where farmers can store their goods until a market is found for them._ Kira says.";
	text2 = "_The co-op helps the farmer get a better price for their product by finding larger clients for what is produced._";
	text3 = "_Combining several farmer's production allows the co-op to sell to the bigger customers, splitting a larger profit amongst the co-op members._";
	text4 = "_Even in these hard times, our farmers are well rewarded for their effort._ Kira says proudly.";

begintalknode 49;
	state = 47;
	personality = 611;
	nextstate = -1;
	condition = 1;
	question = "Thanks for the information.";
	text1 = "_No problem._ Kira says.  _And goodbye._";
	action = END_TALK;
